import myArert from "@/components/MyArert/MyArert";

// 定义默认数据
const defaultState = {
  // 显示Loading组件
  showLoading: false,
  myArerttit: '该功能尚未开放',
  myArertshow: false,
  severity: 'error',
  //warning  info success
}

// eslint-disable-next-line
export default (state = defaultState, action) => {
  let newState = JSON.parse(JSON.stringify(state));
  switch (action.type) {
    case "openLoading":
      newState.showLoading = true;
      break
    case "closeLoading":
      newState.showLoading = false;
    case "myarertshow":
      newState.myArertshow = !newState.myArertshow
      break;
    default:
      break;
  }
  return newState;
}